package cn.calm.repaymentNotice.util;

import java.util.Date;

import cn.calm.repaymentNotice.client.RepaymentNoticeException;

public class NoticeInfoUtil {
	public static String info(Date date) throws RepaymentNoticeException{
		long days=DateUtil.subDays(date);
		StringBuilder strbu=new StringBuilder();
		if(days>0){
			strbu.append("距离还款日");
			strbu.append(DateUtil.formatDisplay(date));
			strbu.append("还有");
		}else{
			strbu.append("已经超过还款日");
			strbu.append(DateUtil.formatDisplay(date));
		}
		strbu.append(days);
		strbu.append("天");
		return strbu.toString();
	}
}
